﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Display {
    import flash.geom.*;
    import flash.utils.*;
    import Display.DialogUI.*;
    import Classes.util.*;

    public class FrameLoaderDialog extends GenericDialog {

        protected var m_targetPos:Point;

        public function FrameLoaderDialog(_arg1:String, _arg2:Point=null){
            this.m_targetPos = _arg2;
            super(_arg1);
        }
        override protected function doTrackDialogActions():Boolean{
            return (false);
        }
        override protected function loadAssets():void{
            Global.delayedAssets.get(DelayedAssetLoader.FRAME_MANAGER_ASSETS, makeAssets);
        }
        override protected function createAssetDict():Dictionary{
            var _local1:Dictionary = new Dictionary();
            _local1["frameLoader_bg"] = m_comObject.frameLoader_bg;
            _local1["frameLoader_beak"] = m_comObject.frameLoader_beak;
            _local1["frameLoader_waiting"] = m_comObject.frameLoader_waiting;
            return (_local1);
        }
        override protected function createDialogView(_arg1:Dictionary):GenericDialogView{
            return (new FrameLoaderDialogView(_arg1, m_message, !((this.m_targetPos == null))));
        }
        override public function centerPopup():void{
            if (this.m_targetPos){
                this.x = (this.m_targetPos.x - (this.width / 2));
                this.y = (this.m_targetPos.y - this.height);
            } else {
                super.centerPopup();
            };
        }
        public function setupDefaultSizeAndPosition():void{
            var _local1:Point;
            this.width = 62.6;
            this.height = 48.2;
            m_centered = true;
            _local1 = getDialogOffset();
            this.x = ((Global.stage.stageWidth / 2) + _local1.x);
            this.y = ((Global.stage.stageHeight / 2) + _local1.y);
        }

    }
}//package Display 
